package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipmentMapper;
import com.ruoyi.system.domain.Equipment;
import com.ruoyi.system.service.IEquipmentService;

/**
 * 设备入库Service业务层处理
 * 
 * @author gzhuangwei
 * @date 2022-09-23
 */
@Service
public class EquipmentServiceImpl implements IEquipmentService 
{
    @Autowired
    private EquipmentMapper equipmentMapper;

    /**
     * 查询设备入库
     * 
     * @param id 设备入库主键
     * @return 设备入库
     */
    @Override
    public Equipment selectEquipmentById(Long id)
    {
        return equipmentMapper.selectEquipmentById(id);
    }

    /**
     * 查询设备入库列表
     * 
     * @param equipment 设备入库
     * @return 设备入库
     */
    @Override
    public List<Equipment> selectEquipmentList(Equipment equipment)
    {
        return equipmentMapper.selectEquipmentList(equipment);
    }

    /**
     * 新增设备入库
     * 
     * @param equipment 设备入库
     * @return 结果
     */
    @Override
    public int insertEquipment(Equipment equipment)
    {
        return equipmentMapper.insertEquipment(equipment);
    }

    /**
     * 修改设备入库
     * 
     * @param equipment 设备入库
     * @return 结果
     */
    @Override
    public int updateEquipment(Equipment equipment)
    {
        return equipmentMapper.updateEquipment(equipment);
    }

    /**
     * 批量删除设备入库
     * 
     * @param ids 需要删除的设备入库主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentByIds(Long[] ids)
    {
        return equipmentMapper.deleteEquipmentByIds(ids);
    }

    /**
     * 删除设备入库信息
     * 
     * @param id 设备入库主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentById(Long id)
    {
        return equipmentMapper.deleteEquipmentById(id);
    }

    @Override
    public Equipment selectEquipmentByEquipmentId(String equipmentId) {
        return equipmentMapper.selectEquipmentByEquipmentId(equipmentId);
    }

    @Override
    public List<Equipment> selectEquipmentByUserId(String userId) {
        return equipmentMapper.selectEquipmentByUserId(userId);
    }


}
